
{% assign blockId = block_id | default : section.block_id %}
<style>
    #block_blank-{{blockId}} {
        background-color: var(--bg);
        height: var(--pc-height);
    }
    @media screen and (max-width: 767px) {
        #block_blank-{{blockId}} {
            height: var(--mobile-height);
        } 
    }
</style>
<div class="block_blank" id="block_blank-{{blockId}}" style="--pc-height: {{section.settings.pc_height}}px;--mobile-height: {{section.settings.mobile_height}}px;--bg: {{section.settings.bg}};"></div>

<script>
$(function() {
    $(`#block_blank-{{blockId}}`).parent().css('margin-bottom',`0px`);
    $(`#block_blank-{{blockId}}`).parent().prev().css('margin-bottom',`0px`);
})
</script>
{% schema %}
{
  "class": "block_blank",
  "is_global": false,
  "icon": "icon-Empty",
  "name": {
    "zh_CN": "空白积木块",
    "en_US": "Blank building block"
  },
  "max_blocks": "",
  "blocks": [],
  "settings": [
    {
      "type": "card_header",
      "label": {
        "zh_CN": "设置"
      }
    },
    {
        "type": "card_input_number",
        "max": 1000,
        "min": 0,
        "id": "pc_height",
        "label": {
            "zh_CN": "PC端高度",
            "en_US": "PC height"
        },
        "info": {
            "zh_CN": "单位：px",
            "en_US": "Unit: px"
        },
        "default": 30
    },
    {
        "type": "card_input_number",
        "max": 1000,
        "min": 0,
        "id": "mobile_height",
        "label": {
            "zh_CN": "移动端高度",
            "en_US": "Mobile device height"
        },
        "info": {
            "zh_CN": "单位：px",
            "en_US": "Unit: px"
        },
        "default": 20
    },
    {
        "type": "card_color",
        "id": "bg",
        "label": {
            "zh_CN": "颜色",
            "en_US": "Color"
        },
        "default": ""
    }
  ],
  "default": {
    "settings": {
        "pc_height": 30,
        "mobile_height": 20,
        "bg": ""
    },
    "blocks": []
  }
}
{% endschema %}
